Package com.cisco.pt.ipc.sim
Interface MACSwitch
- All Known Implementing Classes:
MACSwitchImpl
Information provided by the PKI file:
\class MacSwitch
\brief MacSwitch handles and manipulates the MAC address table.
\example network().getDevice("Switch0").getProcess("MacSwitcher")
- Author:
- Auto-generated
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddStaticMac(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:getGlobalMacAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanisEntryExisted(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:booleanportExistedInStatic(String portName) Information provided by the PKI file:booleanremoveStaticMac(MACAddress macAddress, int vlanNumber, String portName) Information provided by the PKI file:Methods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Method Details
-
addStaticMac
Information provided by the PKI file:
\brief Adds a static MAC address to the specified port. \param macAddress, the static MAC address. \param vlanNumber, the VLAN number. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if successful, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
removeStaticMac
Information provided by the PKI file:
\brief Removes the static MAC address from the specified port. \param macAddress, the static MAC address of interest. \param vlanNumber, the VLAN number of interest. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if successful, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
getStaticMacCount
int getStaticMacCount()Information provided by the PKI file:
\brief Returns the number of static MAC addresses configured. \return int, the number of static MAC addresses configured.- Returns:
- int Returns a int
-
getGlobalMacAt
Information provided by the PKI file:
\brief Returns the static MAC address at the specified index. \param index, the index of the static MAC address of interest. \return StaticMac, the StaticMac object at the specified index.- Parameters:
index- Takes in a parameter of index- Returns:
- StaticMac Returns a StaticMac
-
portExistedInStatic
Information provided by the PKI file:
\param Returns true if the specified port has a static MAC address, otherwise false. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if the specified port has a static MAC address, otherwise false.- Parameters:
portName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-
isEntryExisted
Information provided by the PKI file:
\brief Returns true if the specified entry exists in the MAC address table, otherwise false. \param macAddress, the static MAC address of interest. \param vlanNumber, the VLAN number of interest. \param portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0 \return bool, true if the specified entry exists in the MAC address table, otherwise false.- Parameters:
macAddress- Takes in a parameter of macAddressvlanNumber- Takes in a parameter of vlanNumberportName- Takes in a parameter of portName- Returns:
- boolean Returns a boolean
-